package internal

import (
	"context"

	fpyDcsDb "gf/fpy/dcs/db"
)

func init() {
	fpyDcsDb.SetSoPath("./fpy/dcs/db/.so/db.so")
	fpyDcsDb.SetDbUrl("http://192.168.8.101:11001")
	fpyDcsDb.SetDbSid("0ao6")
}

type CmsContentSmallDao struct {
	sid 	string
	dbSid   string
	projectSid 	string
	table   string
	group   string
	columns TCmsContentSmallColumns
}

type TCmsContentSmallColumns struct {
    Sid    string
    AddTime    string
    UpdateTime    string
    IsDel    string
    ArticleSid    string
    FieldLine    string
    Field1    string
    Field2    string
    Field3    string
    Field4    string
    Field5    string
    Field6    string
    Field7    string
    Field8    string
    Field9    string
    Field10    string
    Field11    string
    Field12    string
    Field13    string
    Field14    string
    Field15    string
    Field16    string
    Field17    string
    Field18    string
    Field19    string
    Field20    string
}


var cCmsContentSmallColumns = TCmsContentSmallColumns{
    Sid:    "sid",
    AddTime:    "add_time",
    UpdateTime:    "update_time",
    IsDel:    "is_del",
    ArticleSid:    "article_sid",
    FieldLine:    "field_line",
    Field1:    "field_1",
    Field2:    "field_2",
    Field3:    "field_3",
    Field4:    "field_4",
    Field5:    "field_5",
    Field6:    "field_6",
    Field7:    "field_7",
    Field8:    "field_8",
    Field9:    "field_9",
    Field10:    "field_10",
    Field11:    "field_11",
    Field12:    "field_12",
    Field13:    "field_13",
    Field14:    "field_14",
    Field15:    "field_15",
    Field16:    "field_16",
    Field17:    "field_17",
    Field18:    "field_18",
    Field19:    "field_19",
    Field20:    "field_20",
}

func NewCmsContentSmallDao() *CmsContentSmallDao {
	return &CmsContentSmallDao{
		sid: 	"0apd",
		dbSid:	"0ao6",
		projectSid:	"dbd3",
		group:   "cms",
		table:   "content_small",
		columns: cCmsContentSmallColumns,
	}
}

func (dao *CmsContentSmallDao) Columns() TCmsContentSmallColumns {
	return dao.columns
}

func (dao *CmsContentSmallDao) Group() string {
	return dao.group
}

func (dao *CmsContentSmallDao) Table() string {
	return dao.table
}

func (dao *CmsContentSmallDao) Ctx(ctx context.Context) *fpyDcsDb.TDb {
	return fpyDcsDb.Ctx(ctx).Table(dao.sid).FpyProjectSid(dao.projectSid)
}